FROM openanolis/openjdk:11-8.6

LABEL \
	org.opencontainers.image.title=maven \
	org.opencontainers.image.version=3.5.4-openjdk-11-8.6

RUN yum -y update \
    && yum -y install maven \
    && yum clean all

ENV MAVEN_HOME=/usr/share/maven
ENV MAVEN_CONFIG "/root/.m2"

COPY mvn-entrypoint.sh /usr/local/bin/mvn-entrypoint.sh
COPY settings-docker.xml /usr/share/maven/ref/

ENTRYPOINT ["/usr/local/bin/mvn-entrypoint.sh"]
CMD ["mvn"]
